<template>
  <div>
    <el-row :gutter="20">
      <el-col :offset="4" :span="4">
        <div class="grid-content bg-purple">
          <el-radio-group v-model="radio1" size="">
            <el-radio-button label="1">待选通道</el-radio-button>
            <el-radio-button label="2">已选通道</el-radio-button>
          </el-radio-group>
        </div>
      </el-col>
      <el-col :span="4">
        <div class="grid-content bg-purple">
          <el-radio-group v-model="radio2" size="">
            <el-radio-button label="1">全选</el-radio-button>
            <el-radio-button label="2">全不选</el-radio-button>
          </el-radio-group>
        </div>
      </el-col>
      <el-col :span="4">
        <div class="grid-content bg-purple">
            线路：
          <el-select
            v-model="radio3"
            class="m-2"
            placeholder="选择方式"
            style="width: 60%"
          >
            <el-option label="线路1" value="1"></el-option>
            <el-option label="线路2" value="2"></el-option>
          </el-select>
        </div>
      </el-col>
    </el-row>

    <el-row :gutter="20">
      <el-col :span="6">
        采样范围：<el-input
          style="width: 20%; margin-right: 20px"
          v-model="data.start"
        ></el-input>
        <el-input style="width: 20%" v-model="data.end"></el-input>
      </el-col>
      <el-col :span="6">
        采样点数：<el-input
          style="width: 20%; margin-right: 20px"
          v-model="data.total"
        ></el-input>
      </el-col>
      <el-col :span="6">
        格式：
        <el-select
          v-model="data.saveType"
          class="m-2"
          placeholder="剪辑后的DAT文件格式"
          size=""
          style="width: 70%"
        >
          <el-option label="BINARY" value="1"></el-option>
          <el-option label="ASCII" value="2"></el-option>
        </el-select>
      </el-col>
      <el-col :span="6">
        最高抽样率:
        <el-select
          v-model="data.times"
          class="m-2"
          placeholder="请选择"
          style="width: 50%"
        >
          <el-option label="不抽样" value="1"></el-option>
          <el-option label="1000Hz" value="2"></el-option>
        </el-select>
      </el-col>
    </el-row>

    <el-row :gutter="20">
      <el-col :offset="12">
        <el-radio-group v-model="data.savedType" size="">
          <el-radio-button label="1">保存成COMTRADE</el-radio-button>
          <el-radio-button label="2">保存成[.csv]</el-radio-button>
        </el-radio-group>
      </el-col>
    </el-row>

    <el-row :gutter="20">
      <el-col :offset="20">
        <el-button @click="$emit('saved')" type="primary" size="large" plain>确定</el-button>
      </el-col>
    </el-row>

    
  </div>
</template>
<script lang="ts" setup>
import { ref } from "vue";
// 配置单选框
const radio1 = ref(1);
const radio2 = ref(1);
const radio3 = ref();
const data = ref({
  start: 0,
  end: 0,
  total: 0,
  saveType: undefined,
  times: undefined,
  savedType: 1,
});
</script>